object DMCADUnico_frm: TDMCADUnico_frm
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Left = 435
  Top = 222
  Height = 377
  Width = 624
  object IBQAutProcesso: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    BufferChunks = 1000
    CachedUpdates = False
    SQL.Strings = (
      'SELECT DATAIMPORTACAO, HORAIMPORTACAO'
      'FROM BASEMUNICIPAL'
      
        'WHERE DATAPOSICAO = :POSICAO AND DATAEXTRACAO = :EXTRACAO AND VA' +
        'LIDO = '#39'S'#39' AND CONCLUIDO = '#39'S'#39)
    Left = 32
    Top = 8
    ParamData = <
      item
        DataType = ftDate
        Name = 'POSICAO'
        ParamType = ptInput
        Value = 36526d
      end
      item
        DataType = ftDate
        Name = 'EXTRACAO'
        ParamType = ptInput
        Value = 36526d
      end>
    object IBQAutProcessoDATAIMPORTACAO: TDateField
      DisplayLabel = 'Data de Importa'#231#227'o'
      FieldName = 'DATAIMPORTACAO'
      Origin = 'BASEMUNICIPAL.DATAIMPORTACAO'
      Required = True
      DisplayFormat = 'dd/mm/yyyy'
      EditMask = '!99/99/9999;1; '
    end
    object IBQAutProcessoHORAIMPORTACAO: TTimeField
      DisplayLabel = 'Hora de Importa'#231#227'o'
      FieldName = 'HORAIMPORTACAO'
      Origin = 'BASEMUNICIPAL.HORAIMPORTACAO'
      Required = True
      DisplayFormat = 'HH:mm:ss'
      EditMask = '!99:99:99;1; '
    end
  end
  object IBQBloco: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    BufferChunks = 1000
    CachedUpdates = False
    Left = 208
    Top = 8
  end
  object IBQIdentificador: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    BufferChunks = 1000
    CachedUpdates = False
    SQL.Strings = (
      '  INSERT INTO BASEMUNICIPAL ('
      '    IDBASEMUNICIPAL,'
      '    IDPREFEITURA,'
      '    DATAIMPORTACAO,'
      '    HORAIMPORTACAO,'
      '    NOMEARQUIVO,'
      '    NUMEROLINHAS,'
      '    DATAPOSICAO,'
      '    DATAEXTRACAO,'
      '    VERSAOLAYOUT,'
      '    VALIDO,'
      '    CONCLUIDO,'
      '    INCLUIDOS,'
      '    ALTERADOS,'
      '    ERROS)'
      '  VALUES ('
      '    :IDBASEMUNICIPAL,'
      '    :IDPREFEITURA,'
      '    :DATAIMPORTACAO,'
      '    :HORAIMPORTACAO,'
      '    :NOMEARQUIVO,'
      '    :NUMEROLINHAS,'
      '    :DATAPOSICAO,'
      '    :DATAEXTRACAO,'
      '    :VERSAOLAYOUT,'
      '    :VALIDO,'
      '    :CONCLUIDO,'
      '    :INCLUIDOS,'
      '    :ALTERADOS,'
      '    :ERROS)')
    Left = 130
    Top = 72
    ParamData = <
      item
        DataType = ftInteger
        Name = 'IDBASEMUNICIPAL'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftInteger
        Name = 'IDPREFEITURA'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftDate
        Name = 'DATAIMPORTACAO'
        ParamType = ptInput
        Value = 36526d
      end
      item
        DataType = ftTime
        Name = 'HORAIMPORTACAO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'NOMEARQUIVO'
        ParamType = ptInput
      end
      item
        DataType = ftInteger
        Name = 'NUMEROLINHAS'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftDate
        Name = 'DATAPOSICAO'
        ParamType = ptInput
        Value = 36526d
      end
      item
        DataType = ftDate
        Name = 'DATAEXTRACAO'
        ParamType = ptInput
        Value = 36526d
      end
      item
        DataType = ftString
        Name = 'VERSAOLAYOUT'
        ParamType = ptInput
        Value = '05.31'
      end
      item
        DataType = ftString
        Name = 'VALIDO'
        ParamType = ptInput
        Value = 'N'
      end
      item
        DataType = ftString
        Name = 'CONCLUIDO'
        ParamType = ptInput
        Value = 'N'
      end
      item
        DataType = ftInteger
        Name = 'INCLUIDOS'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftInteger
        Name = 'ALTERADOS'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftInteger
        Name = 'ERROS'
        ParamType = ptInput
        Value = 0
      end>
  end
  object IBQBuscaPref: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    BufferChunks = 1000
    CachedUpdates = False
    SQL.Strings = (
      'SELECT IDPREFEITURA'
      'FROM PREFEITURAS'
      'WHERE CHAVENATURAL = :CHAVE')
    Left = 32
    Top = 64
    ParamData = <
      item
        DataType = ftString
        Name = 'CHAVE'
        ParamType = ptInput
        Value = Null
      end>
    object IBQBuscaPrefIDPREFEITURA: TIntegerField
      DisplayLabel = 'C'#243'digo Prefeitura'
      FieldName = 'IDPREFEITURA'
      Origin = 'PREFEITURAS.IDPREFEITURA'
    end
  end
  object IBQPrefeitura: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    BufferChunks = 1000
    CachedUpdates = False
    SQL.Strings = (
      '  INSERT INTO PREFEITURAS ('
      '    IDPREFEITURA,'
      '    CHAVENATURAL,'
      '    CODMUNICIPIOIBGE2,'
      '    CODMUNICIPIOIBGE5,'
      '    NOMEPREFEITURA,'
      '    CODIGOIBGE,'
      '    SISTEMA)'
      '  VALUES ('
      '    :IDPREFEITURA,'
      '    :CHAVENATURAL,'
      '    :CODMUNICIPIOIBGE2,'
      '    :CODMUNICIPIOIBGE5,'
      '    :NOMEPREFEITURA,'
      '    :CODIGOIBGE,'
      '    :SISTEMA)')
    Left = 130
    Top = 8
    ParamData = <
      item
        DataType = ftInteger
        Name = 'IDPREFEITURA'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftString
        Name = 'CHAVENATURAL'
        ParamType = ptInput
        Value = Null
      end
      item
        DataType = ftInteger
        Name = 'CODMUNICIPIOIBGE2'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftInteger
        Name = 'CODMUNICIPIOIBGE5'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftString
        Name = 'NOMEPREFEITURA'
        ParamType = ptInput
        Value = Null
      end
      item
        DataType = ftInteger
        Name = 'CODIGOIBGE'
        ParamType = ptInput
        Value = 0
      end
      item
        DataType = ftString
        Name = 'SISTEMA'
        ParamType = ptInput
        Value = 'N'
      end>
  end
  object IBQTemp: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    BufferChunks = 1000
    CachedUpdates = False
    Left = 264
    Top = 8
  end
  object IBSPLinkDomicilio: TIBStoredProc
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    ForcedRefresh = True
    StoredProcName = 'VINCULOCADASTROS'
    Left = 128
    Top = 152
    ParamData = <
      item
        DataType = ftInteger
        Name = 'DOMICILIOFED'
        ParamType = ptInput
        Value = 0
      end>
  end
  object IBQBuscas: TIBQuery
    Database = DMSistema_frm.IBDataBaseSIGAS
    Transaction = DMSistema_frm.IBTransactionSIGAS
    BufferChunks = 1000
    CachedUpdates = False
    Left = 264
    Top = 72
  end
end
